package advance_2;

import java.util.ArrayList;
import java.util.*;
import java.util.Collections;

public class UtilsTest {
    public static void main(String[] args) {
        int[] ar = {1, 4, 5, 15, 113, 49, 50};
        ar = Arrays.copyOf(ar, 20);
        System.out.println(Arrays.toString(ar));
        Arrays.sort(ar);
        System.out.println(Arrays.toString(ar));
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>");
        //age, String sex, String job, double money, String workNumber
        Student[] a2 = {new Student("老吴", 23, "男", "经理", 18900, "3991")
                , new Student("老张", 25, "男", "经理", 15900, "3992")
                ,
                new Student("小宋", 21, "女", "经理", 19900, "3993")
        };
        //Arrays.sort(a2);
        for(Student s:a2)
            System.out.println(s);
        //TreeMap
        List<Student> list=new ArrayList<>();
        Collections.addAll(list,a2);
        System.out.println(list);
        Student max=Collections.max(list);
        System.out.println("最大的"+max);

    }
}
